/**
 * 
 */
package com.fruit.app.common.util;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Discription: 线程池
 * @ClassName: ThreadPool
 *
 * @Author:[caiwei]
 * @Version 1.0
 * @Date 2012-5-7 下午3:57:07
 *
 */
public abstract class ThreadPool {

	public final static Integer THREAD_NUM_MAX = 150;
	
	private static ExecutorService pool = Executors.newFixedThreadPool(THREAD_NUM_MAX);
	
	private ThreadPool(){
	}
	
	/**
	 * @Call: upload file producer
	 * @Title: execute
	 * @Discription: 将创建的线程加入线程池中运行
	 *
	 * @Author:[caiwei]
	 * @Version 1.0
	 * @Date 2012-5-7 下午4:08:24
	 *
	 * @param thread
	 * @ReturnType: void
	 */
	public static void execute(Runnable runnable){
		pool.execute(runnable);
	}
}
